Apply masks & clean pixel to any type of non compliant image #231
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some XA or RF images (or any kind) can contain patient information in the image depending on the station that produced the image
Clean pixel profile element application conditions
This profile is applied only on the following SOP:
1.2.840.10008.5.1.4.1.1.6.1 - Ultrasound Image Storage
1.2.840.10008.5.1.4.1.1.7.1 - Multiframe Single Bit Secondary Capture Image Storage
1.2.840.10008.5.1.4.1.1.7.2 - Multiframe Grayscale Byte Secondary Capture Image Storage
1.2.840.10008.5.1.4.1.1.7.3 - Multiframe Grayscale Word Secondary Capture Image Storage
1.2.840.10008.5.1.4.1.1.7.4 - Multiframe True Color Secondary Capture Image Storage
1.2.840.10008.5.1.4.1.1.3.1 - Ultrasound Multiframe Image Storage
1.2.840.10008.5.1.4.1.1.77.1.1 - VL endoscopic Image Storage
Or if the tag value Burned In Annotation (0028,0301) is “YES”
For the images outside this scope, a mask cannot be applied
Following the implementation of the new feature #228 we can now define a profile that adds the BurnedInAnnotation attributes and sets its value properly
Example of profile:
name: "Clean pixel data"
version: "1.0"
minimumKarnakVersion: "0.9.2"
defaultIssuerOfPatientID:
profileElements:
name: "Add tag BurnedInAnnotation if does not exist"
codename: "action.add.tag"
condition: "tagValueContains(#Tag.StationName, 'ICT256') && !tagIsPresent(#Tag.BurnedInAnnotation)"
arguments:
value: "YES"
vr: "CS"
tags:
name: "Set BurnedInAnnotation to YES"
codename: "expression.on.tags"
condition: "tagValueContains(#Tag.StationName, 'ICT256')"
arguments:
expr: "Replace('YES')"
tags:
name: "Clean pixel data"
codename: "clean.pixel.data"
name: "DICOM basic profile"
codename: "basic.dicom.profile"
masks: